using System;
using System.Linq;
using MvcMall.Core.Contacts.Repositories;
using MvcMall.Core.Domains;
using NHibernate.Linq;

namespace MvcMall.Data.Repositories
{
    public class AdminUserRepository : DataRepository<AdminUser>, IAdminUserRepository
    {
        public AdminUser GetUser(string userName)
        {
            return Session.Query<AdminUser>()
                .Where(m => m.UserName.ToLower() == userName.ToLower())
                .FirstOrDefault();
        }
    }
}